# -*- coding:utf-8 -*-

from com.mat.rpa.utils.globalConstants import GlobalConstants
from com.mat.rpa.views.workWindow.leftPanel.directiveTree import treeItem
from . import operatingSystemConstants
from .fileOperations import fileOperationSubDirectiveTree
from .fileFolderOperations import fileFolderOperationSubDirectiveTree
from .clipBoardOperations import clipBoardOperationSubDirectiveTree
from .compressingOrDecompressingOperations import compressingOrDecompressingOperationSubDirectiveTree
from .lockingAndUnlockingScreen import lockingAndUnlockingScreenOperationSubDirectiveTree
from .inputMethods import inputMethodOperationSubDirectiveTree
from .screenProtection import screenProtectionSubDirectiveTree

class OperatingSystemSubDirectiveTree(treeItem.TreeItemWithID):
    def __init__(self, parent):
        super(OperatingSystemSubDirectiveTree, self).__init__(parent)
        self.createOperatingSystemTreeNode()

    def createOperatingSystemTreeNode(self):
        self.nodeType = GlobalConstants.treeBranchType
        self.directiveType = "operatingSystemOperations"
        self.setText(0,"操作系统操作")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, operatingSystemConstants.OperatingSystenConstants.runningOrOpenningDirective, "运行或打开")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, operatingSystemConstants.OperatingSystenConstants.executingDOSDirective, "运行DOS命令")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, operatingSystemConstants.OperatingSystenConstants.endingProgramDirective, "终止程序")
        self.createTreeNode(GlobalConstants.treeLeafType,
                            self, operatingSystemConstants.OperatingSystenConstants.screenSnapshotDirective, "截屏")
        #挂载操作系统操作子节点
        fileOperationSubDirectiveTree.FileOperationSubDirectiveTree(self)
        fileFolderOperationSubDirectiveTree.FileFolderOperationSubDirectiveTree(self)
        clipBoardOperationSubDirectiveTree.ClipBoardOperationSubDirectiveTree(self)
        compressingOrDecompressingOperationSubDirectiveTree.CompressingOrDecompressingOperationSubDirectiveTree(self)
        lockingAndUnlockingScreenOperationSubDirectiveTree.LockingAndUnlockingOperationSubDirectiveTree(self)
        inputMethodOperationSubDirectiveTree.InputMethodOperationSubDirectiveTree(self)
        screenProtectionSubDirectiveTree.ScreenProtectionSubDirectiveTree(self)